<!-- HTML header for doxygen 1.11.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: Internationalization</title>
<link rel="icon" href="doxygen.ico" type="image/x-icon" />
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen_manual.css" rel="stylesheet" type="text/css"/>
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><a href="../index.html"><img alt="Logo" src="doxygen_logo.svg" height="35px"/></a></td>
  <td class="menu-item"><a href="index.html">Docs</a></td>
  <td class="menu-item"><a href="changelog.html">Changelog</a></td>
  <td class="menu-item"><a href="../helpers.html">Extensions</a></td>
  <td class="menu-item"><a href="../examples.html">Examples</a></td>
  <td class="menu-spacer">&#160;</td>
  <td class="menu-item" id="download">
      <img class="download-icon" src="../assets/download.svg" width="16px" height="16px" alt="Download doxygen"/>
      <a href="../download.html">Download</a>
  </td>
  <td class="menu-item" id="donate">
     <form action="https://www.paypal.com/cgi-bin/webscr" method="post" class="nav-item d-inline-flex px-1 mx-1">
       <input type="hidden" name="cmd" value="_donations" />
       <input type="hidden" value="doxygen@gmail.com" name="business" />
       <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted" />
       <input type="hidden" name="lc" value="US" />
       <input type="hidden" name="tax" value="0" />
       <input type="hidden" name="item_name" value="Doxygen donation" />
       <input type="hidden" name="no_shipping" value="1" />
       <table class="donate">
         <tr>
           <td class="donate-button"><input type="image" width="74" height="21"
               src="https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif" border="0" name="submit"
               alt="Donate to Doxygen with PayPal!" /></td>
         </tr>
         <tr>
           <td class="currency"><select size="1" name="currency_code">
               <option selected="selected" value="EUR">&euro; (EUR)</option>
               <option value="USD">$ (USD)</option>
             </select></td>
         </tr>
       </table>
     </form>
   </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
     <div id="nav-tree-ads-carbon">
       <script async type="text/javascript" src="https://cdn.carbonads.com/carbon.js?serve=CK7DTK3M&placement=stacknl" id="_carbonads_js"></script>
     </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('langhowto.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<div><div class="header">
  <div class="headertitle"><div class="title">Internationalization</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h3>Support for multiple languages</h3>
<p>Doxygen has built-in support for multiple languages. This means that the text fragments, generated by doxygen, can be produced in languages other than English (the default). The output language is chosen through the configuration option <a class="el" href="config.html#cfg_output_language">OUTPUT_LANGUAGE</a> in the configuration file (with default name and known as Doxyfile). To switch between languages inside a comment block the <a class="el" href="commands.html#cmdtilde">\~</a> command can be used.</p>
<p>Currently (version 1.11.0), 42 languages are supported (sorted alphabetically): Afrikaans, Arabic, Armenian, Brazilian Portuguese, Bulgarian, Catalan, Chinese, Chinese Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Finnish, French, German, Greek, Hindi, Hungarian, Indonesian, Italian, Japanese (+En), Korean (+En), Latvian, Lithuanian, Macedonian, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, SerbianCyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, Ukrainian, and Vietnamese..</p>
<p>The table of information related to the supported languages follows. It is sorted by language alphabetically. The <b>Status</b> column was generated from sources and shows approximately the last version when the translator was updated.</p>
<p> 
</p>
<table align="center" cellspacing="0" cellpadding="0" border="0">
<tr bgcolor="#000000">
<td>
  <table cellspacing="1" cellpadding="2" border="0">
  <tr bgcolor="#4040c0">
  <td ><b><font size="+1" color="#ffffff"> Language </font></b></td>
  <td ><b><font size="+1" color="#ffffff"> Maintainer </font></b></td>
  <td ><b><font size="+1" color="#ffffff"> Contact address </font>
          <font size="-2" color="#ffffff">(replace the at and dot)</font></b></td>
  <td ><b><font size="+1" color="#ffffff"> Status </font></b></td>
  </tr>
  <!-- table content begin -->

  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Afrikaans</td>
    <td>Johan Prinsloo</td>
    <td>johan at zippysnoek dot com</td>
    <td bgcolor="#ff5555">1.6.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Arabic</td>
    <td>Moaz Reyad<br/>Muhammad Bashir Al-Noimi</td>
    <td><span style="color: brown">[resigned]</span><br/>mbnoimi at gmail dot com</td>
    <td bgcolor="#ff5555">1.4.6</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Armenian</td>
    <td>Armen Tangamyan</td>
    <td>armen dot tangamyan at anu dot edu dot au</td>
    <td bgcolor="#ffcccc">1.8.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Brazilian Portuguese</td>
    <td>Fabio "FJTC" Jun Takada Chino</td>
    <td>jun-chino at uol dot com dot br</td>
    <td bgcolor="#ccffcc">up-to-date</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Bulgarian</td>
    <td>Kiril Kirilov</td>
    <td>kpkirilov at abv dot bg</td>
    <td bgcolor="#ffffcc">1.9.4</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Catalan</td>
    <td>Maximiliano Pin<br/>Albert Mora</td>
    <td>max dot pin at bitroit dot com<br/><span style="color: brown">[unreachable]</span></td>
    <td bgcolor="#ffcccc">1.8.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Chinese</td>
    <td>Lian Yang<br/>Li Daobing<br/>Wei Liu</td>
    <td>lian dot yang dot cn at gmail dot com<br/>lidaobing at gmail dot com<br/>liuwei at asiainfo dot com</td>
    <td bgcolor="#ccffcc">up-to-date</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Chinese Traditional</td>
    <td>Daniel YC Lin<br/>Gary Lee</td>
    <td>dlin dot tw at gmail dot com<br/>garywlee at gmail dot com</td>
    <td bgcolor="#ffcccc">1.8.15</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Croatian</td>
    <td>Boris Bralo</td>
    <td>boris dot bralo at gmail dot com</td>
    <td bgcolor="#ffcccc">1.8.2</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Czech</td>
    <td>Petr Přikryl</td>
    <td>prikryl at atlas dot cz</td>
    <td bgcolor="#ffffcc">1.9.6</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Danish</td>
    <td>Poul-Erik Hansen<br/>Erik Søe Sørensen</td>
    <td>pouhan at gnotometrics dot dk<br/>eriksoe+doxygen at daimi dot au dot dk</td>
    <td bgcolor="#ffcccc">1.8.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Dutch</td>
    <td>Dimitri van Heesch</td>
    <td>doxygen at gmail dot com</td>
    <td bgcolor="#ccffcc">up-to-date</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">English</td>
    <td>Dimitri van Heesch</td>
    <td>doxygen at gmail dot com</td>
    <td bgcolor="#ccffcc">up-to-date</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Esperanto</td>
    <td>Ander Martínez</td>
    <td>ander dot basaundi at gmail dot com</td>
    <td bgcolor="#ffcccc">1.8.4</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Finnish</td>
    <td>Antti Laine</td>
    <td>antti dot a dot laine at tut dot fi</td>
    <td bgcolor="#ff5555">1.6.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">French</td>
    <td>David Martinet<br/>Xavier Outhier<br/>Benoît BROSSE</td>
    <td>contact at e-concept-applications dot fr<br/>xouthier at yahoo dot fr<br/>Benoit dot BROSSE at ingenico dot com</td>
    <td bgcolor="#ffffcc">1.9.5</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">German</td>
    <td>Peter Grotrian<br/>Jens Seidel</td>
    <td>Peter dot Grotrian at pdv-FS dot de<br/>jensseidel at users dot sf dot net</td>
    <td bgcolor="#ffcccc">1.8.15</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Greek</td>
    <td>Paul Gessos</td>
    <td>gessos dot paul at yahoo dot gr</td>
    <td bgcolor="#ff5555">1.11.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Hindi</td>
    <td>Harsh Rathod</td>
    <td>hrathore50 at ymail dot com</td>
    <td bgcolor="#ffffcc">1.9.4</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Hungarian</td>
    <td>Ákos Kiss<br/>Földvári György</td>
    <td>akiss at users dot sourceforge dot net<br/><span style="color: brown">[unreachable]</span></td>
    <td bgcolor="#ffcccc">1.8.15</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Indonesian</td>
    <td>Hendy Irawan</td>
    <td>ceefour at gauldong dot net</td>
    <td bgcolor="#ffcccc">1.8.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Italian</td>
    <td>Alessandro Falappa<br/>Ahmed Aldo Faisal</td>
    <td>alex dot falappa at gmail dot com<br/>aaf23 at cam dot ac dot uk</td>
    <td bgcolor="#ffcccc">1.8.15</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Japanese</td>
    <td>Suzumizaki-Kimikata<br/>Hiroki Iseri<br/>Ryunosuke Satoh<br/>Kenji Nagamatsu<br/>Iwasa Kazmi</td>
    <td>szmml at h12u.com<br/>goyoki at gmail dot com<br/>sun594 at hotmail dot com<br/><span style="color: brown">[unreachable]</span><br/><span style="color: brown">[unreachable]</span></td>
    <td bgcolor="#ffcccc">1.8.15</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">JapaneseEn</td>
    <td>see the Japanese language</td>
    <td>&#160;</td>
    <td bgcolor="#ccffcc">English based</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Korean</td>
    <td>Kim Taedong<br/>SooYoung Jung<br/>Richard Kim</td>
    <td>fly1004 at gmail dot com<br/>jung5000 at gmail dot com<br/><span style="color: brown">[unreachable]</span></td>
    <td bgcolor="#ffcccc">1.8.15</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">KoreanEn</td>
    <td>see the Korean language</td>
    <td>&#160;</td>
    <td bgcolor="#ccffcc">English based</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Latvian</td>
    <td>Lauris</td>
    <td>lauris at nix.lv</td>
    <td bgcolor="#ffcccc">1.8.4</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Lithuanian</td>
    <td>Tomas Simonaitis<br/>Mindaugas Radzius<br/>Aidas Berukstis<br/><span style="color: red; background-color: yellow">-- searching for the maintainer --</span></td>
    <td><span style="color: brown">[unreachable]</span><br/><span style="color: brown">[unreachable]</span><br/><span style="color: brown">[unreachable]</span><br/><span style="color: brown">[Please, try to help to find someone.]</span></td>
    <td bgcolor="#ff5555">1.4.6</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Macedonian</td>
    <td>Slave Jovanovski</td>
    <td>slavejovanovski at yahoo dot com</td>
    <td bgcolor="#ff5555">1.6.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Norwegian</td>
    <td>Lars Erik Jordet</td>
    <td>lejordet at gmail dot com</td>
    <td bgcolor="#ff5555">1.4.6</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Persian</td>
    <td>Ali Nadalizadeh</td>
    <td>nadalizadeh at gmail dot com</td>
    <td bgcolor="#ff5555">1.7.5</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Polish</td>
    <td>Piotr Kaminski<br/>Grzegorz Kowal<br/>Krzysztof Kral<br/>Marek Ledworowski</td>
    <td><span style="color: brown">[unreachable]</span><br/><span style="color: brown">[unreachable]</span><br/>krzysztof dot kral at gmail dot com<br/>mledworo at gmail dot com</td>
    <td bgcolor="#ff5555">1.11.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Portuguese</td>
    <td>Rui Godinho Lopes<br/>Fabio "FJTC" Jun Takada Chino</td>
    <td><span style="color: brown">[resigned]</span><br/>jun-chino at uol dot com dot br</td>
    <td bgcolor="#ccffcc">up-to-date</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Romanian</td>
    <td>Ionut Dumitrascu<br/>Alexandru Iosup</td>
    <td>reddumy at yahoo dot com<br/>aiosup at yahoo dot com</td>
    <td bgcolor="#ffcccc">1.8.15</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Russian</td>
    <td>Brilliantov Kirill Vladimirovich<br/>Alexandr Chelpanov</td>
    <td>brilliantov at byterg dot ru<br/>cav at cryptopro dot ru</td>
    <td bgcolor="#ffcccc">1.8.15</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Serbian</td>
    <td>Dejan Milosavljevic</td>
    <td><span style="color: brown">[unreachable]</span></td>
    <td bgcolor="#ff5555">1.6.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">SerbianCyrillic</td>
    <td>Nedeljko Stefanovic</td>
    <td>stenedjo at yahoo dot com</td>
    <td bgcolor="#ff5555">1.6.0</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Slovak</td>
    <td>Kali+Laco Švec<br/>Petr Přikryl</td>
    <td><span style="color: brown">[the Slovak language advisors]</span><br/>prikryl at atlas dot cz</td>
    <td bgcolor="#ffcccc">1.8.15</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Slovene</td>
    <td>Matjaž Ostroveršnik</td>
    <td>matjaz dot ostroversnik at ostri dot org</td>
    <td bgcolor="#ff5555">1.4.6</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Spanish</td>
    <td>Bartomeu<br/>Francisco Oltra Thennet<br/>David Vaquero</td>
    <td>bartomeu at loteria3cornella dot com<br/><span style="color: brown">[unreachable]</span><br/>david at grupoikusnet dot com</td>
    <td bgcolor="#ffffcc">1.9.6</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Swedish</td>
    <td>Björn Palmqvist</td>
    <td>bjorn.palmqvist at aidium.se</td>
    <td bgcolor="#ffffcc">1.9.6</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Turkish</td>
    <td>Emin Ilker Cetinbas</td>
    <td>niw3 at yahoo dot com</td>
    <td bgcolor="#ff5555">1.7.5</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ffffff">Ukrainian</td>
    <td>Olexij Tkatchenko<br/>Petro  Yermolenko</td>
    <td><span style="color: brown">[resigned]</span><br/>python at i dot ua</td>
    <td bgcolor="#ffcccc">1.8.4</td>
  </tr>
  <tr bgcolor="#ffffff">
    <td bgcolor="#ff5555">Vietnamese</td>
    <td>Dang Minh Tuan</td>
    <td>tuanvietkey at gmail dot com</td>
    <td bgcolor="#ff5555">1.6.0</td>
  </tr>
  <!-- table content end -->
  </table>
</td>
</tr>
</table>
<p>
</p>
<p></p>
<p>Most people on the list have indicated that they were also busy doing other things, so if you want to help to speed things up please let them (or me) know.</p>
<p>If you want to add support for a language that is not yet listed please read the next section.</p>
<h3>Adding a new language to doxygen</h3>
<p>This short HOWTO explains how to add support for the new language to doxygen:</p>
<p>Just follow the following steps: </p><ol>
<li>
Tell me for which language (say <code>YourLanguage</code>) you want to add support. If no one else is already working on support for that language, you will be assigned as the maintainer for the language. </li>
<li>
Add to the file <code>doxygen/src/config.xml</code>, at the appropriate place in the <a class="el" href="config.html#cfg_output_language">OUTPUT_LANGUAGE</a> part, the line: <pre class="fragment">      &lt;value name='YourLanguage'/&gt;
</pre> </li>
<li>
Create a copy of <code>doxygen/src/translator_en.h</code> and name it <code>doxygen/src/translator_&lt;your_2_letter_country_code&gt;.h</code> I'll use <code>xx</code> in the rest of this document (and <code>XX</code> for the uppercase version). </li>
<li>
<p class="startli">Edit <code>doxygen/src/language.cpp</code>: Add the following code: </p><pre class="fragment">#include&lt;translator_xx.h&gt;
</pre> <p class="endli">Now, in <code>setTranslator()</code> add </p><pre class="fragment">case OUTPUT_LANGUAGE_t::YourLanguage: theTranslator = new TranslatorYourLanguage; break;
</pre> </li>
<li>
Edit <code>doxygen/src/translator_xx.h</code>: <ul>
<li>
Use the UTF-8 capable editor and open the file using the UTF-8 mode (non BOM mode). </li>
<li>
Rename <code>TRANSLATOR_EN_H</code> to <code>TRANSLATOR_XX_H</code> twice (i.e. in the <code>#ifndef</code> and <code>#define</code> preprocessor commands at the beginning of the file). </li>
<li>
Rename <code>TranslatorEnglish</code> to <code>TranslatorYourLanguage</code> </li>
<li>
In the member <code>idLanguage()</code> change "english" into the name of your language (use lower case characters only). Depending on the language you may also wish to change the member functions <code>latexLanguageSupportCommand()</code> and other (you will recognize them when you start the work). </li>
<li>
Edit all the strings that are returned by the member functions that start with <code>tr</code>. Try to match punctuation and capitals! To enter special characters (with accents) you can: <ul>
<li>
Enter them directly if your keyboard supports that. Recall that the text is expected to be saved using the UTF-8 encoding. Doxygen will translate the characters to proper <img class="formulaInl" alt="{\LaTeX}" src="form_0.png" width="34" height="13"/> and leaves the HTML and man output in UTF-8. </li>
<li>
Use HTML codes like <code>&amp;auml</code>; for an <code>a</code> with an <code>umlaut</code> (i.e. <code>&auml;</code>). See the HTML specification for the codes. </li>
</ul>
</li>
</ul>
</li>
<li>
Edit <code>doxygen/doc/maintainers.txt</code> and add yourself to the list of maintainers like: <div class="fragment"><div class="line">TranslatorYourLanguage</div>
<div class="line">&lt;your name&gt;: &lt;your dot email at your dot domain&gt;</div>
</div><!-- fragment --> </li>
<li>
Build the documentation by giving the appropriate build command (like: <code>make docs</code>). </li>
<li>
Now you can use <code>OUTPUT_LANGUAGE = your_language_name</code> in the config file to generate output in your language. </li>
<li>
The preferred way is to clone the doxygen repository at GitHub and make a Pull Request. Alternatively send <code>translator_xx.h</code> to me so I can add it to doxygen. Send also your name and e-mail address to be included in the <code>maintainers.txt</code> list. </li>
</ol>
<h3>Maintaining a language</h3>
<p>New versions of doxygen may use new translated sentences. In such situation, the <code>Translator</code> class requires implementation of new methods &ndash; its interface changes. Of course, the English sentences need to be translated to the other languages. At least, new methods have to be implemented by the language-related translator class; otherwise, doxygen wouldn't even compile. Waiting until all language maintainers have translated the new sentences and sent the results would not be very practical. The following text describes the usage of translator adapters to solve the problem.</p>
<p><b>The role of Translator Adapters.</b> Whenever the <code>Translator</code> class interface changes in the new release, the new class <code>TranslatorAdapter_x_y_z</code> is added to the <code>translator_adapter.h</code> file (here x, y, and z are numbers that correspond to the current official version of doxygen). All translators that previously derived from the <code>Translator</code> class now derive from this adapter class.</p>
<p>The <code>TranslatorAdapter_x_y_z</code> class implements the new, required methods. If the new method replaces some similar but obsolete method(s) (e.g. if the number of arguments changed and/or the functionality of the older method was changed or enriched), the <code>TranslatorAdapter_x_y_z</code> class may use the obsolete method to get the result which is as close as possible to the older result in the target language. If it is not possible, the result (the default translation) is obtained using the English translator, which is (by definition) always up-to-date.</p>
<p><b>For example,</b> when the new <code>trFile()</code> method with parameters (to determine the capitalization of the first letter and the singular/plural form) was introduced to replace the older method <code>trFiles()</code> without arguments, the following code appeared in one of the translator adapter classes:</p>
<pre class="fragment">    /*! This is the default implementation of the obsolete method
     * used in the documentation of a group before the list of
     * links to documented files.  This is possibly localized.
     */
    virtual QCString trFiles()
    { return "Files"; }

    /*! This is the localized implementation of newer equivalent
     * using the obsolete method trFiles().
     */
    virtual QCString trFile(bool first_capital, bool singular)
    {
      if (first_capital &amp;&amp; !singular)
        return trFiles();  // possibly localized, obsolete method
      else
        return english.trFile(first_capital, singular);
    }
</pre><p>The <code>trFiles()</code> is not present in the <code>TranslatorEnglish</code> class, because it was removed as obsolete. However, it was used until now and its call was replaced by</p>
<pre class="fragment">    trFile(true, false)
</pre><p>in the doxygen source files. Probably, many language translators implemented the obsolete method, so it perfectly makes sense to use the same language dependent result in those cases. The <code>TranslatorEnglish</code> does not implement the old method. It derives from the abstract <code>Translator</code> class. On the other hand, the old translator for a different language does not implement the new <code>trFile()</code> method. Because of that it is derived from another base class &ndash; <code>TranslatorAdapter_x_y_z</code>. The <code>TranslatorAdapter_x_y_z</code> class has to implement the new, required <code>trFile()</code> method. However, the translator adapter would not be compiled if the <code>trFiles()</code> method was not implemented. This is the reason for implementing the old method in the translator adapter class (using the same code, that was removed from the TranslatorEnglish).</p>
<p>The simplest way would be to pass the arguments to the English translator and to return its result. Instead, the adapter uses the old <code>trFiles()</code> in one special case &ndash; when the new <code>trFile(true,&#160;false)</code> is called. This is the mostly used case at the time of introducing the new method &ndash; see above. While this may look too complicated, the technique allows the developers of the core sources to change the Translator interface, while the users may not even notice the change. Of course, when the new <code>trFile()</code> is used with different arguments, the English result is returned and it will be noticed by non English users. Here the maintainer of the language translator should implement at least that one particular method.</p>
<p><b>What says the base class of a language translator?</b> If the language translator class inherits from any adapter class then maintenance is needed. In such case, the language translator is considered not up-to-date. On the other hand, if the language translator derives directly from the abstract class <code>Translator</code>, the language translator is up-to-date.</p>
<p>The translator adapter classes are chained so that the older translator adapter class uses the one-step-newer translator adapter as the base class. The newer adapter does less <em>adapting</em> work than the older one. The oldest adapter class derives (indirectly) from all of the adapter classes. The name of the adapter class is chosen so that its suffix is derived from the previous official version of doxygen that did not need the adapter. This way, one can say approximately, when the language translator class was last updated &ndash; see details below.</p>
<p>The newest translator adapter derives from the abstract <code>TranslatorAdapterBase</code> class that derives directly from the abstract <code>Translator</code> class. It adds only the private English-translator member for easy implementation of the default translation inside the adapter classes, and it also enforces implementation of one method for notifying the user that the language translation is not up-to-date (because of that some sentences in the generated files may appear in English).</p>
<p>Once the oldest adapter class is not used by any of the language translators, it can be removed from the doxygen project. The maintainers should try to reach the state with the minimal number of translator adapter classes.</p>
<p><b>To simplify the maintenance of the language translator classes</b> for the supported languages, the <code>translator.py</code> Python script was developed (located in <code>doxygen/doc</code> directory). It extracts the important information about obsolete and new methods from the source files for each of the languages. The information is stored in the translator report ASCII file (<code>translator_report.txt</code>).</p>
<p> You can find this file as <a href="translator_report.txt"
><code>translator_report.txt</code></a>.</p>
<p>Looking at the base class of the language translator, the script guesses also the status of the translator &ndash; see the last column of the table with languages above. The <code>translator.py</code> is called automatically when the doxygen documentation is generated. You can also run the script manually whenever you feel that it can help you. Of course, you are not forced to use the results of the script. You can find the same information by looking at the adapter class and its base classes.</p>
<p><b>How should I update my language translator?</b> First, you should be the language maintainer, or you should let him/her know about the changes. The following text was written for the language maintainers as the primary audience.</p>
<p>There are several approaches to be taken when updating your language. If you are not extremely busy, you should always chose the most radical one. When the update takes much more time than you expected, you can always decide use some suitable translator adapter to finish the changes later and still make your translator working.</p>
<p><b>The most radical way of updating the language translator</b> is to make your translator class derive directly from the abstract class <code>Translator</code> and provide translations for the methods that are required to be implemented &ndash; the compiler will tell you if you forgot to implement some of them. If you are in doubt, have a look at the <code>TranslatorEnglish</code> class to recognize the purpose of the implemented method. Looking at the previously used adapter class may help you sometimes, but it can also be misleading because the adapter classes do implement also the obsolete methods (see the previous <code>trFiles()</code> example).</p>
<p>In other words, the up-to-date language translators do not need the <code>TranslatorAdapter_x_y_z</code> classes at all, and you do not need to implement anything else than the methods required by the Translator class (i.e. the pure virtual methods of the <code>Translator</code> &ndash; they end with <code>=0;</code>).</p>
<p>If everything compiles fine, try to run <code>translator.py</code>, and have a look at the translator report (ASCII file) at the <code>doxygen/doc</code> directory. Your translator is marked as up-to-date only if the script does not detect anything special. If the translator uses the <code>Translator</code> base class, there still may be some remarks related to your source code. In the case, the translator is marked as <em>almost up-to-date</em>. Namely, the obsolete methods&ndash;that are not used at all&ndash;may be listed in the section for your language. Simply, remove their code (and run the <code>translator.py</code> again). Also, you will be informed when you forgot to change the base class of your translator class to some newer adapter class or directly to the Translator class.</p>
<p><b>If you do not have time to finish all the updates</b> you should still start with <em>the most radical approach</em> as described above. You can always change the base class to the translator adapter class that implements all of the not-yet-implemented methods.</p>
<p><b>If you prefer to update your translator gradually</b>, have a look at <code>TranslatorEnglish</code> (the <code>translator_en.h</code> file). Inside, you will find the comments like <code>new since 1.2.4</code> that separate always a number of methods that were implemented in the stated version. Do implement the group of methods that are placed below the comment that uses the same version numbers as your translator adapter class. (For example, your translator class have to use the <code>TranslatorAdapter_1_2_4</code>, if it does not implement the methods below the comment <code>new since 1.2.4</code>. When you implement them, your class should use a newer translator adapter.</p>
<p>Run the <code>translator.py</code> script occasionally and give it your <code>xx</code> identification (from <code>translator_xx.h</code>) to create the translator report shorter (also produced faster) &ndash; it will contain only the information related to your translator. Once you reach the state when the base class should be changed to some newer adapter, you will see the note in the translator report.</p>
<p>Warning: Don't forget to compile doxygen to discover, whether it is compilable. The <code>translator.py</code> does not check if everything is correct with respect to the compiler. Because of that, it may lie sometimes about the necessary base class.</p>
<p><b>The most obsolete language translators</b> would lead to implementation of too complicated adapters. Because of that, doxygen developers may decide to derive such translators from the <code>TranslatorEnglish</code> class, which is by definition always up-to-date.</p>
<p>When doing so, all the missing methods will be replaced by the English translation. This means that not-implemented methods will always return the English result. Such translators are marked using the word <code>obsolete</code>. You should read it <b>really obsolete</b>. No guess about the last update can be done.</p>
<p>Often, it is possible to construct better result from the obsolete methods. Because of that, the translator adapter classes should be used if possible. On the other hand, implementation of adapters for really obsolete translators brings too much maintenance and run-time overhead.</p>
<p> 
Go to the <a href="perlmod.html">next</a> section or return to the
 <a href="index.html">index</a>.
 </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0 </li>
  </ul>
</div>
</body>
</html>
